<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        alert(JSON.stringify({ clientWidth: document.documentElement.clientWidth, clientHeight: document.documentElement.clientHeight, devicePixelRatio: window.devicePixelRatio, realWidth: document.documentElement.clientWidth  * window.devicePixelRatio ,realHeight: document.documentElement.clientHeight * window.devicePixelRatio },null,4))

    </script>
</body>

</html>